import Vue from "vue";
import VueRouter from "vue-router";


Vue.use(VueRouter);

const routes = [
  {
    path: "/home",
    name: "home",
    component: () => import('../views/Home.vue')
  },
  {
    path: "/",
    redirect : '/home'
  },
  {
    path: "/list",
    name: "list",
    component: () => import('../views/List.vue')
  },{
    path: "/cart",
    name: "cart",
    component: () => import('../views/Cart.vue')
  },{
    path: "/mine",
    name: "mine",
    component: () => import('../views/Mine.vue')
  },
  {
    path: "/reg",
    name: "reg",
    component: () => import('../views/Reg.vue'),
    // meta : {//元信息
    //   ishide : true,
    //   name : '注册页'
    // }
  },
  {
    path: "/login",
    name: "login",
    component: () => import('../views/Login.vue'),
    // meta : {
    //   ishide : true
    // }
  },
];

const router = new VueRouter({
  routes
});

export default router;